home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_02_11 / 2n11074a < prev    next >
Text File  |  1991-09-29  |  2KB  |  69 lines

  1. //  VCR.H - VCR device driver classes
  2. //      VCR - Panasonic Selectra AG-1960 VCR class
  3.  
  4. #ifndef VCR_H
  5.     #define VCR_H
  6.  
  7. #include    "Port.h"
  8.  
  9. enum CueType {Fine, Coarse};
  10. enum VCRMode {StopMode, EjectMode, RewindMode, FFMode,
  11.         PlayFRMode, PlayFFMode, StillMode, RecordMode,
  12.         PlayMode, PowerOffMode, NoTapeMode};
  13.  
  14. struct Frame
  15. {
  16.     int nHour;
  17.     int nMinute;
  18.     int nSecond;
  19.     int nFrame;
  20. };
  21.  
  22. class VCR
  23. {
  24.     private:
  25.         SerialPort *spSerialPort;
  26.         void SendCommand (Str sCommandString);
  27.         Str ReceiveResponse (void);
  28.         void ValidateFrame (struct Frame& sfFrame);
  29.  
  30.     public:
  31.         VCR (int nNewPortAddress = 0x3F8);  // COM1:
  32.         ~VCR ();
  33.         void Stop ();
  34.         void Eject ();
  35.         void Rewind ();
  36.         void FastForward ();
  37.         void PlayFastReverse();
  38.         void PlayFastForward ();
  39.         void Still ();
  40.         void Record ();
  41.         void Play ();
  42.         void ReversePlay ();
  43.         void StepForward ();
  44.         void StepReverse ();
  45.         void PowerToggle ();
  46.         void ShuttleOn ();
  47.         void ShuttleUp ();
  48.         void ShuttleDown ();
  49.         void ForwardShuttle (int nSpeed);
  50.         void ReverseShuttle (int nSpeed);
  51.         void CueToFrame (struct Frame NewFrame);
  52.         void SetCueType (CueType ctNewCueType);
  53.         void PlayToFrame (struct Frame EndFrame);
  54.         void PlaySegment (struct Frame StartFrame, struct Frame EndFrame);
  55.         void AudioInsertToFrame (struct Frame EndFrame);
  56.         void AudioVideoInsertToFrame (struct Frame EndFrame);
  57.         void PrePlay ();
  58.         void Calibrate ();
  59.         void ClearCounter ();
  60.  
  61.         void AudioSelect ();
  62.         void ResetVCR ();
  63.         struct Frame RequestFrame ();
  64.         VCRMode RequestMode ();
  65. };
  66.  
  67. #endif VCR_H
  68. // End of File
  69.